package com.ruoyi.project.monitor.tarsmonitor.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.monitor.tarsmonitor.mapper.TarsMonitorMapper;
import com.ruoyi.project.monitor.tarsmonitor.domain.TarsMonitor;
import com.ruoyi.project.monitor.tarsmonitor.service.ITarsMonitorService;
import com.ruoyi.common.utils.text.Convert;

/**
 * tars监控Service业务层处理
 * 
 * @author shixiangwen
 * @date 2020-03-23
 */
@Service
public class TarsMonitorServiceImpl implements ITarsMonitorService 
{
    @Autowired
    private TarsMonitorMapper tarsMonitorMapper;

    /**
     * 查询tars监控
     * 
     * @param id tars监控ID
     * @return tars监控
     */
    @Override
    public TarsMonitor selectTarsMonitorById(Long id)
    {
        return tarsMonitorMapper.selectTarsMonitorById(id);
    }

    /**
     * 查询tars监控列表
     * 
     * @param tarsMonitor tars监控
     * @return tars监控
     */
    @Override
    public List<TarsMonitor> selectTarsMonitorList(TarsMonitor tarsMonitor)
    {
        return tarsMonitorMapper.selectTarsMonitorList(tarsMonitor);
    }

    /**
     * 新增tars监控
     * 
     * @param tarsMonitor tars监控
     * @return 结果
     */
    @Override
    public int insertTarsMonitor(TarsMonitor tarsMonitor)
    {
        return tarsMonitorMapper.insertTarsMonitor(tarsMonitor);
    }

    /**
     * 修改tars监控
     * 
     * @param tarsMonitor tars监控
     * @return 结果
     */
    @Override
    public int updateTarsMonitor(TarsMonitor tarsMonitor)
    {
        return tarsMonitorMapper.updateTarsMonitor(tarsMonitor);
    }

    /**
     * 删除tars监控对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTarsMonitorByIds(String ids)
    {
        return tarsMonitorMapper.deleteTarsMonitorByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除tars监控信息
     * 
     * @param id tars监控ID
     * @return 结果
     */
    @Override
    public int deleteTarsMonitorById(Long id)
    {
        return tarsMonitorMapper.deleteTarsMonitorById(id);
    }
}
